<script>
	import {
		queryByMobileUserId
	} from '@/core/api/user.js';
	import Vue from 'vue';
	export default {
		onLaunch: function() {
			// 设置语言
			if(uni.getStorageSync('locale')){
				this._i18n.locale = uni.getStorageSync('locale');
			}
			// 设置主题
			this.$store.commit("config/set_model",'dark');
			if(uni.getStorageSync('model')){
				this.$store.commit("config/set_model",uni.getStorageSync('model'));
			}
			Vue.prototype.$qiyuModule = uni.requireNativePlugin("Netease-QiyuModule");
			this.$qiyuModule.initSdk({
				appKey: "21e79d326c77bd17a0a14ccb45f2d4c9",
				appName: "在线客服",
			});
			if(uni.getStorageSync('mobileUserId')){
				queryByMobileUserId({
					mobileUserId:uni.getStorageSync('mobileUserId'),
				}).then(res=>{
					console.log(res,'cs-queryByMobileUserId');
				})
			}else{
				Vue.prototype.$tool.navTo('/pages/login/login',3);
			}
			// uni.reLaunch({
			// 	url:'/pages/login/registerH5'
			// })
			// this.$store.commit("config/set_model",'light');
			
		},
		onLoad() {

		},
		onShow: function() {
			
		},
		onHide: function() {
			
		}
	}
</script>

<style>
	/*每个页面公共css */
	@import "static/css/flex.css";
	@import "static/css/public.css";
	@import "static/css/text.css";
	/* #app{
		width: 100vh;
		height: 100vh;
		background: #000;
	} */
</style>
